/**
 * 
 */
package com.storm.lib.bean;

/**
 * 
 * 类功能: 检查是否重复的Bean
 * @author johnny
 * @version 2010-12-21
 */
public class CheckcCircleBean {
	private int maxTimes;
	private int currentTimes;
	
	
	
	public CheckcCircleBean() {
		this.maxTimes=1000000;
	}

	public CheckcCircleBean(int maxTimes) {
		this.maxTimes = maxTimes;
	}

	/**
	 * @return the times
	 */
	public int getTimes() {
		return maxTimes;
	}

	/**
	 * @param times the times to set
	 */
	public void setTimes(int times) {
		this.maxTimes = times;
	}

	/**
	 * @return the maxTimes
	 */
	public int getMaxTimes() {
		return maxTimes;
	}

	/**
	 * @param maxTimes the maxTimes to set
	 */
	public void setMaxTimes(int maxTimes) {
		this.maxTimes = maxTimes;
	}

	/**
	 * @return the currentTimes
	 */
	public int getCurrentTimes() {
		return currentTimes;
	}

	/**
	 * @param currentTimes the currentTimes to set
	 */
	public void setCurrentTimes(int currentTimes) {
		this.currentTimes = currentTimes;
	}

	/**
	 * @author johnny
	 * @date 2010-8-26
	 * @do 
	 */
	public void count() {
		this.currentTimes++;
		if(this.currentTimes>this.maxTimes){
			throw new RuntimeException("Checkc CircleBean Error!!!");
		}
		
	}
	

}
